package com.example.blog_001.Service.impl;

import com.example.blog_001.Entity.User;
import com.example.blog_001.Mapper.UserMapper;
import com.example.blog_001.Service.UserService;
import com.example.blog_001.Utils.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User checkUsernameAndPassword(String username, String password) {
        return userMapper.checkUsernameAndPassword(username, MD5Utils.code(password));
    }
}
